Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use more precise return type for StreamInterface::getMetadata#103

Open
jtojnar wants to merge 1 commit into
php-fig:master from
jtojnar:stream-metadata
Open

Use more precise return type for StreamInterface::getMetadata #103
jtojnar wants to merge 1 commit into
php-fig:master from
jtojnar:stream-metadata

Conversation

@jtojnar

@jtojnar jtojnar commented Mar 8, 2023

Copy link
Copy Markdown

The array keys are always strings.

And when null is passed as $key argument, it should always return an array. But that can be only concisely expressed in PHPStan – Psalm requires a template type for conditional types. So let’s use prefixed annotation.

The array keys are always strings.
And when `null` is passed as `$key` argument, it should always return an array. But that can be only concisely expressed in PHPStan – Psalm requires a template type for conditional types. So let’s use prefixed annotation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /